package object;

public class ObjectDemo {
    public static void main(String[] args) {
        Point p = new Point(100,200);
        System.out.println(p);
        Point p1 = new Point(100,200);
        Point p2 =new Point(200,300);
        System.out.println(p==p1);
        System.out.println(p.equals(p1));
        System.out.println(p1.equals(p2));
        System.out.println(p.hashCode());
        System.out.println(p1.hashCode());
        System.out.println(p2.hashCode());
        String string = new String("hello");
        String string1 = new String("hello");
        System.out.println(string.equals(string1));
        System.out.println(string==string1);
        StringBuilder stringBuilder = new StringBuilder("hello");
        StringBuilder stringBuilder1 = new StringBuilder("hello");
        System.out.println(stringBuilder==stringBuilder1);
        System.out.println(stringBuilder.equals(stringBuilder1));
        System.out.println(string.equals(stringBuilder1));
        System.out.println(stringBuilder1);
        System.out.println(string);
    }
}
